1. Technical Field
The present invention relates to image coding apparatuses which perform compression coding on three-dimensional video signals, and in particular to an image coding apparatus which codes stereo images, and which is provided for an image transmission apparatus or an image recording apparatus such as a digital video camera and a digital still camera which handles two video signals indicating disparity, that is, a stereo video signal.
2. Background Art
When three-dimensional video signals are displayed on a screen that is larger than a screen assumed at the time of capturing, a distance between right and left images seen more distantly than a surface of the screen becomes greater than a distance between eyes of a viewer. In this case, the viewer attempts to maintain binocular fusion to three-dimensionally view the image, which makes eye muscle and a brain of the viewer very tired. In addition, when the distance (gap) further becomes greater, there is a problem that the viewer cannot maintain the binocular fusion, and the three-dimensional viewing fails. In order to prevent the problem, a process of blurring a long-distance view is conventionally performed so that the viewer avoids paying attention to the long-distance view (see NPL 1, for instance).
In addition, it is considered that the process of blurring a long-distance view is performed at the time of coding.
A conventional image coding apparatus which codes a three-dimensional video signal (stereo video signal) controls a degree of quantization according to disparity indicated by the stereo video signal, to control an amount of code. In other words, when the disparity is small, a degree of significance of an area having the disparity is high, and thus the image, coding apparatus increases an amount of information of the area, and when the disparity is large, the image coding apparatus decreases an amount of information of an area having the disparity, and performs a process of blurring an image in the area accordingly (see PTL 1, for example).
FIG. 1 is a block diagram showing a configuration of the conventional image coding apparatus described in PTL 1.
As shown in FIG. 1, video signals from two cameras are respectively input to processing circuits 101 and 102, and thus RGB component signals are obtained. After being converted by corresponding AD conversion units 103 and 104 into digital data sequences, the RGB component signals are accumulated in corresponding memories 105 and 106. It is to be noted that each of the memories 105 and 106 is a memory which is capable of storing digital data sequences for eight lines. The digital data sequence for eight lines, that is, data of an area (block) including 8×8 pixels on a screen is read from each of the memories 105 and 106. Subsequent processing is performed on a block-by-block basis (for each of blocks).
The data of the block accumulated in the memory 105 is input to a DCT circuit 107. The DCT circuit 107 transforms, by performing discrete cosine transform, the data into a coefficient block including real data in a frequency domain. Then, the coefficient block is input to a quantization circuit 108. The coefficient block is multiplied by a reciprocal of a predetermined quantization step, to be an integer. The quantization step is determined through the use of human visual performance, and is set so that less distortion is allowed on a lower frequency side, and much distortion is allowed on a higher frequency side. To put it differently, a quantization step for a coefficient on a low frequency side is set to be small, and a large amount of code is assigned to the low frequency side.
Then, a zero pack circuit 109 performs run-length coding on the data thus quantized. Stated differently, the zero pack circuit 109 counts the number of consecutive zeros, and codes the quantized data by pairing the number of the consecutive zeros and a coefficient which breaks the consecutive zeros.
Here, the image coding apparatus described in PTL 1 includes: a subtractor 110 which performs, for each pixel, a subtraction process between data of blocks stored in the respective memories 105 and 106; and an absolute value sum circuit 111 which calculates a sum (disparity signal) of absolute values obtained from the result of the subtraction process performed by the subtractor 110. The absolute value sum of differences between the data for the respective pixels, which is obtained in the absolute value sum circuit 111, corresponds to a displacement of an image represented by the block, that is, a disparity.
The quantization circuit 108 adjusts the quantization step according to a disparity signal output from the absolute value sum circuit 111.
A Huffman coding unit 112 performs Huffman coding, one of types of entropy coding, on the run-length coded data which is output from the zero pack circuit 109.
As stated above, the image coding apparatus described in PTL 1 increases, for the block having the large disparity, the quantization step to increase a data compression ratio of the block, and accordingly improves coding efficiency and performs the blurring process.
The following describes image capturing methods for cameras.
FIG. 2A is a diagram showing an image capturing method used by two cameras.
Cameras 21 and 22 capture an object 23 with optical axes of the respective cameras 21 and 22 crossing. Such an image capturing method is called a cross view method.
It is to be noted that an optical axis is an axis which is at the center of an image captured by a camera and is along a direction vertical to a surface of the image. A disparity is a difference between a position of an image (left image) of the object 23 captured by the camera 21 and a position of an image (right image) of the object 23 captured by the camera 22. A distance from each of the cameras 21 and 22 along a direction vertical to an array direction of the cameras 21 and 22 is called a capturing distance. Distances from each of the cameras 21 and 22 to an intersection point and a focal point are called an intersection point distance and a focal distance, respectively.
For instance, the object 23 is at an intersection point of the optical axis of the camera 21 and the optical axis of the camera 22, and the cameras 21 and 22 focus on the intersection point. In such a case, an intersection point distance is equal to a focal distance, an image of the object 23 is clear, and a disparity of the image is smallest. On the other hand, when a capturing distance is longer than the intersection point distance (focal distance), a disparity of an image of a distant object 24 at the capturing distance is indicated by differences 25a and 25b, and is much larger than the disparity of the object 23.
FIG. 2B is a graph showing a relationship between capturing distance and disparity in the cross view method.
As shown in FIG. 2B, when a capturing distance L is between 0 and an intersection point distance L1, a disparity D of an image of an object at the capturing distance L decreases as a positive value with an increase in the capturing distance L. Moreover, the disparity D becomes 0 at the intersection point distance. Furthermore, when the capturing distance L is longer than the intersection point distance L1, the disparity D decreases as a negative value with an increase in the capturing distance L. In other words, in this case, the disparity D is the negative value, and an absolute value of the disparity D increases with an increase in the capturing distance L.
As above, when the object 23 is at the intersection point (focal point), the image of the object 23 has no disparity. The image of the distant object 24 at a position farther away from the cameras 21 and 22 than the intersection point has the disparity which increases in a negative direction. In this case, although the viewer can three-dimensionally view the image of the object 23 easily, when attempting to three-dimensionally view the image of the distant object 24, the viewer needs to keep lines of sight of both eyes apart from one another. As a result, this makes the both eyes tired.
In response, the image coding apparatus described in PTL 1 determines, as a magnitude of disparity, a difference in image between one of blocks and the other of the blocks, and blurs an image of a block having a large disparity among the blocks, by increasing a quantization step for the block having the large disparity. In other words, the image coding apparatus described in PTL 1 decreases an amount of information in an area having a large disparity due to a low degree of significance of the area, and increases an amount of information in an area having a small disparity due to a high degree of significance of the area.